<?php


namespace App\Service;

use Hyperf\AsyncQueue\Annotation\AsyncQueueMessage;

class QueueService
{
    /**
     * @AsyncQueueMessage(maxAttempts=1, delay=5)
     * @param $path
     */
    public function importExcel($path)
    {
        if (strpos($path, 'a.txt') !== false) {
            sleep(2);
        }
       echo $path."\n";
       $data = file_get_contents($path);
       echo $data."\n";
    }
}